<?php

require 'vendor/autoload.php';

use \LeanCloud\Object;
use \LeanCloud\Query;
// 参数依次为 AppId, AppKey, MasterKey
\LeanCloud\Client::initialize("Di3UPU0fwgl2tLvr2PBOXLi7-gzGzoHsz", "yOuoxQWaAa5aDGByHHBDeE51", "8WHrcHqgPRmLQHwWM6jJW1TT");

$testObject = new Object("TestObject");
$testObject->set("words", "Hello World!");
try {
    $testObject->save();
    echo "Save object success!";
} catch (Exception $ex) {
    echo "Save object fail!";
}

 $query =new Query("_User");
 $data=current($query->find())->getObjectId();
 echo json_encode($data);